package com.edu.controller;

import com.edu.domain.Food;
import com.edu.service.FoodService;
import com.edu.service.impl.FoodServiceImpl;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public class FoodController {
    private FoodService foodService=new FoodServiceImpl();
  // /FoodController/listFoodByBusinessId?businessId=10001
    public Object listFoodByBusinessId(HttpServletRequest request){
        int businessId= Integer.parseInt(request.getParameter("businessId"));
        List<Food> list=this.foodService.listFoodByBusinessId(businessId);
        return list;
    }
}
